/**
 * Created by win7 on 2017/3/15.
 */
import Relay from "react-relay";

export default class ReplyLastUserMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation {getReplyLastUser }`;
    }

    getVariables() {
        return {
            argsInput: {
                suggestId: this.props.suggestId

            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on getReplyLastUserPayload {
            getReplyLastUser {
                errorCode
                value
                totalResult
                id
                suggestModel{
                    createDate
                    userName
                    phone
                }
                 replyModel{
                    createDate
                    userName
                    phone
                }
            }
        }`;
    }


    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on getReplyLastUserPayload {
            getReplyLastUser {
                        errorCode
                        value
                        totalResult
                        id
                        suggestModel{
                            createDate
                            userName
                            phone
                        }
                        replyModel{
                            createDate
                            userName
                            phone
                        }
                    }
                }
            `]
        }];
    }

}